#!/bin/bash
set -e

echo $1

mkdir -p bin dist
if [ -e ./scripts/$1 ]; then
    ./scripts/"$@"
else
    exec "$@"
fi

if [ -n "${DAPPER_UID}" ] && [ -n "${DAPPER_GID}" ]; then
  chown -R ${DAPPER_UID}:${DAPPER_GID} .
fi
